import request from '@/utils/request'

// 查询质量检验列表
export function listInspection(query) {
  return request({
    url: '/qc/inspection/list',
    method: 'get',
    params: query
  })
}

// 查询质量检验详细
export function getInspection(inspectionId) {
  return request({
    url: '/qc/inspection/' + inspectionId,
    method: 'get'
  })
}

// 新增质量检验
export function addInspection(data) {
  return request({
    url: '/qc/inspection',
    method: 'post',
    data: data
  })
}

// 修改质量检验
export function updateInspection(data) {
  return request({
    url: '/qc/inspection',
    method: 'put',
    data: data
  })
}

// 删除质量检验
export function delInspection(inspectionId) {
  return request({
    url: '/qc/inspection/' + inspectionId,
    method: 'delete'
  })
}

// 产品不分页
export function listProduct(query) {
  return request({
    url: '/pm/plan/product/getlist',
    method: 'get',
    params: query
  })
}

//检验员不分页
export function listInspector(query) {
  return request({
    url: '/qc/inspection/inspector/getlist',
    method: 'get',
    params: query
  })
}
// 关联工单不分页
export function listWorkorder(query) {
  return request({
    url: '/pm/inspection/workorder/getlist',
    method: 'get',
    params: query
  })
}
